class CircleMaker {
  constructor(callback,areaid){
    this.callback = callback
    this.areaid=areaid;
  }
  makeADom(text,point,BMap,text1){
    var div =document.createElement("div");
    var top = document.createElement("div");
    var buttom = document.createElement("div");
    top.style.width="50px";
    top.style.height='25px';
    top.style.lineHeight='25px';
    top.appendChild(document.createTextNode(text));
    buttom.style.width="50px";
    buttom.style.height='25px';
    buttom.style.lineHeight='25px';
    buttom.appendChild(document.createTextNode(text1));
    div.appendChild(top);
    div.appendChild(buttom);
    div.style.position = "absolute";
    div.style.zIndex = BMap.Overlay.getZIndex(point.lat);
    div.style.backgroundColor = "#00ae66";
    div.style.border = "1px solid write";
    div.style.borderRadius="50%"
    div.style.color = "white";
    div.style.height = "50px";
    div.style.width = "50px";
    div.style.padding = "5px";
    div.style.lineHeight = "36px";
    div.style.textAlign="center";
    div.style.whiteSpace = "nowrap";
    div.style.MozUserSelect = "none";
    div.style.fontSize = "4vw";
    var that =this;
    div.addEventListener("click",()=>{
      that.callback(that.areaid);
    })

    return div;
  }

}
export default CircleMaker
